import VueRouter from 'vue-router'

import Home from './components/Home.vue'
import Login from './subcomponents/Login.vue'
import Register from './subcomponents/Register.vue'
import Department from './components/Department.vue'
import Center from './components/Center.vue'

import AllComs from './components/comunityClassifyed/AllComs.vue'
import Sport from './components/comunityClassifyed/Sport.vue'
import Volunteer from './components/comunityClassifyed/Volunteer.vue'
import Recreation from './components/comunityClassifyed/recreation.vue'
import Society from './components/comunityClassifyed/Society.vue'
import Creativity from './components/comunityClassifyed/Creativity.vue'
import Literature from './components/comunityClassifyed/Literature.vue'
import Developing from './components/404.vue'
// 3. 创建路由对象
var router = new VueRouter({
  routes: [
    { path: '/', redirect: '/home' },
    { path: '/home', component: Home },
    { path: '/login', component: Login },
    { path: '/register', component: Register },
    { path: '/department', component: Department },
    { path: '/center', component: Center },
    { path: '/comunitydisplay/allcoms', component: AllComs },
    { path: '/comunitydisplay/sport', component: Sport },
    { path: '/comunitydisplay/volunteer', component: Volunteer },
    { path: '/comunitydisplay/recreation', component: Recreation },
    { path: '/comunitydisplay/society', component: Society },
    { path: '/comunitydisplay/creativity', component: Creativity },
    { path: '/comunitydisplay/literature', component: Literature },
    { path: '/developing', component: Developing },

  ]
})

// 把路由对象暴露出去
export default router